home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _8DE073A3A23D444D93E919760B172D37 < prev    next >
Encoding:
Text File  |  2004-04-29  |  669 b   |  43 lines

  1.  
  2. regc(0, "COMBINED_XFORM")
  3. regc(4, "MODELVIEW_XFORM")
  4. regc(10, "FOG_PARAMS")
  5.  
  6. regc(20, "TEXTURE0_XFORM")
  7. regc(24, "TEXTURE1_XFORM")
  8. regc(28, "TEXTURE2_XFORM")
  9. regc(32, "TEXTURE3_XFORM")
  10.  
  11. vshader("
  12.  
  13. #define point        v0
  14.  
  15. #include <fog.inc>
  16.  
  17.     vs_1_1
  18.  
  19.     dcl_position    point
  20.  
  21.     ; output position (must the calculated in the same way in all passes)
  22.     m4x4    r0, point, c0
  23.         mov    oPos, r0
  24.  
  25.     ; pos in camera space
  26.     m4x4    r0, point, c4
  27.  
  28.     ; output texcoords
  29.     m4x4    oT0, r0, c20
  30.     m4x4    oT1, r0, c24
  31.  
  32.     dp4    oT2.x, r0, c28
  33.     dp4    oT2.y, r0, c29
  34.  
  35.     dp4    oT3.x, r0, c32
  36.     dp4    oT3.y, r0, c33
  37.  
  38.     ; calc fog
  39.        dp4    r0.x, point, c2
  40.         FOG(r0.x, c10, r10)
  41. ")
  42.  
  43.